<!-- * 文件名：合伙人
* 作者：ZQK
* 描述：〈描述〉
* 修改人：ZQK
* 修改时间：2025-3-9  -->
<template>
	<view class="partner">
		<image class="logo" :src="logoUrl?logoUrl:getUrl('/logo.png')" mode="widthFix"></image>
		<view class="partnerText">用电减免计划</view>
		<image :src="getUrl('/partner_image.png')" mode="widthFix"></image>
		<view class="details">{{content}}</view>
		<view class="btnBox">
			<view class="btn" @click="handleToRecruit">成为合伙人</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { reactive, ref } from 'vue'
	import { onShow, onLoad } from "@dcloudio/uni-app"
	import { getUrl } from '@/utils/imagePlugin'
	import Api from '@/api/modules/home.ts'
	
	const handleToRecruit = () => {
		uni.navigateTo({
			url: '/pages/recruitPartner/recruitPartner'
		})
	}
	
	let content = ref<string>('')
	const getSettingInfo = () => {
		Api.getSettingInfo().then((res: any) => {
			content.value = res.data.partnerIntroduction
		})
	}
	
	let logoUrl = ref<string>('')
	const getLogo = () => {
		Api.getSystemInfo().then((res: any) => {
			logoUrl.value = res.data?.logoUrl
		})
	}
	
	onLoad((options: any)=>{
		getSettingInfo()
		getLogo()
	})
</script>

<style lang="scss" scoped>
	.partner{
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 100vh;
		position: relative;
		
		.logo{
			width: 260rpx;
		}
		
		.partnerText{
			font-size: 56rpx;
			font-weight: 600;
			margin-bottom: 40rpx;
		}
		
		.details{
			margin-top: 60rpx;
			font-size: 28rpx;
		}
		
		.btnBox{
			width: 100%;
			padding: 0 40rpx;
			position: absolute;
			bottom: 80rpx;
			
			.btn{
				background: #5EB847;
				padding: 20rpx;
				color: #ffffff;
				border-radius: 50rpx;
				font-size: 36rpx;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}
	}
</style>